
import 'package:favourcate/ui/pages/home/home_drawer.dart';
import 'package:favourcate/ui/pages/main/init_items.dart';
import 'package:flutter/material.dart';

class GLMainScreen extends StatefulWidget {
  static const String routeName = '/';
  const GLMainScreen({ Key? key }) : super(key: key);

  @override
  _GLMainScreenState createState() => _GLMainScreenState();
}

class _GLMainScreenState extends State<GLMainScreen> {

  int _currentIndex = 0;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: IndexedStack(
        index: _currentIndex,
        children: pages,
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: items,
        currentIndex: _currentIndex,
        selectedFontSize: 14,
        unselectedFontSize: 14,
        onTap: (index) {
          setState(() {
            _currentIndex = index;
          });
        },
      ),
      drawer: const GLHomeDrawer(),
    );
  }
}